package com.ruoyi.common.domain.business.mp;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * 微信小程序用户对象 mp_user
 *
 * @author Song
 * @date 2024-01-24
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("mp_user")
@ApiModel(description = "微信小程序用户")
public class MpUser extends BaseEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(name = "主键id")
    private Long id;
    /**
     * 微信唯一标识
     */
    @Excel(name = "微信唯一标识")
    @ApiModelProperty(name = "微信唯一标识")
    private String openId;
    /**
     * union_id
     */
    @Excel(name = "union_id")
    @ApiModelProperty(name = "union_id")
    private String unionId;
    /**
     * 微信昵称
     */
    @Excel(name = "微信昵称")
    @ApiModelProperty(name = "微信昵称")
    private String nickName;
    /**
     * 手机号
     */
    @Excel(name = "手机号")
    @ApiModelProperty(name = "手机号")
    private String phone;
    /**
     * 用户名
     */
    @Excel(name = "用户名")
    @ApiModelProperty(name = "用户名")
    private String name;
    /**
     * 逻辑删除(0表示未删除，1表示软删除)
     */
    @TableLogic
    @ApiModelProperty(name = "逻辑删除(0表示未删除，1表示软删除)")
    private Long isDelete;

    /**
     * 头像url
     */
    private String avatarUrl;
    /**
     * 用户名
     */
    private String username;
    /**
     * 密码
     */
    private String password;
    /**
     * 盐值
     */
    private String salt;
    /**
     * 部门id
     */
    private Integer deptId;
    /**
     * 父id
     */
    private Integer parentId;
    public MpUser() {
        this.password = "123456";
    }
}
